(function() {
    var u = NEJ.P("nej.ut"),
    e = NEJ.P("nej.e"),
    v = NEJ.P("nej.v"),
    yu = NEJ.P("yxp.u"),
    p = NEJ.P("yxp.ut"),
    hf = null;
    p.gA = NEJ.C();
    hf = p.gA.dy(u.et, !0);
    hf.dD = function(cz) {
        this.fq = e.cK(cz.parent) || null;
        this.jx = cz.slideList || [];
        this.lj = cz.tabList || [];
        this.nr = cz.duration || 600;
        this.hB = cz.timeout || 5e3;
        this.gY = cz.linkedItem || null;
        this.Jk = cz.urlList || [];
        this.fD(cz);
        this.CH(cz)
    };
    hf.fD = function(cz) {
        var cX, nG;
        cX = cz.index;
        nG = cz.selected;
        for (var i = 0; i < this.jx.length; i++) {
            e.gl(this.jx[i], "index", i)
        }
        this.lk = u.fU.dz({
            list: this.lj,
            index: cX,
            event: "mouseover",
            selected: nG,
            onchange: this.ny.cC(this)
        });
        if (this.fq) {
            v.cM(this.fq, "mouseover", this.jr.cC(this));
            v.cM(this.fq, "mouseout", this.jA.cC(this))
        }
    };
    hf.tc = function() {};
    hf.ny = function(cz) {
        var hJ = null,
        lw = null,
        iF = null;
        for (var fh = 0; fh < this.jx.length; fh++) {
            if (e.gl(this.jx[fh], "index") == cz.index) {
                hJ = this.jx[fh];
                break
            }
        }
        hJ.parentNode.appendChild(hJ);
        this.jB = cz.index;
        if (iF = yu.mc(hJ) > .5) {
            iF = yu.mc(hJ, 0)
        }
        this.gY.setAttribute("href", this.Jk[cz.index]);
        lw = u.uW.dz({
            from: {
                offset: iF
            },
            to: {
                offset: 1
            },
            duration: this.nr * (1 - iF),
            onupdate: function(options) {
                yu.mc(hJ, options.offset)
            },
            onstop: function() {
                u.uW.hp(lw)
            }
        });
        lw.px();
        if (this.ho != null) {
            window.clearTimeout(this.ho)
        }
        this.ho = window.setTimeout(this.ph.cC(this), this.hB)
    };
    hf.ph = function() {
        this.jB = this.jB || 0;
        if (this.jB >= this.jx.length - 1) {
            this.lk.fy(0)
        } else {
            this.lk.fy(this.jB + 1)
        }
    };
    hf.jr = function() {
        window.clearTimeout(this.ho)
    };
    hf.jA = function() {
        this.ho = window.setTimeout(this.ph.cC(this), this.hB / 3)
    }
})(); (function() {
    var p = NEJ.P("yxp.page"),
    yut = NEJ.P("yxp.ut"),
    e = NEJ.P("nej.e"),
    v = NEJ.P("nej.v"),
    cG,
    Jm = ["http://yxp.163.com/store/goods/deskcalendar/0/?act=yxpsyrm_20121127_03", "http://yxp.163.com/store/goods/photobook/1/?act=yxpsyrm_20121127_04", "http://yxp.163.com/store/goods/2/128/?act=yxpsyrm_20121127_05", "http://yxp.163.com/store/goods/9/119/?act=yxpsyrm_20121127_06", "http://yxp.163.com/store/goods/6/111/?act=yxpsyrm_20121127_07", "http://yxp.163.com/store/goods/8/115/?act=yxpsyrm_20121127_08"];
    p.Jn = NEJ.C();
    cG = p.Jn.prototype;
    cG.zW = function() {
        this.nZ();
        this.AM();
        this.o$();
        this.oZ();
        this.BV();
        e.f$("template_topbar")
    };
    cG.At = function() {
        var _ = e.cK("qg-countdown");
        if (!_) {
            return false
        }
        var oX = e.gl(_, "endtime");
        var oV = (new Date).getTime();
        yut.fM.dz({
            until: oX - oV,
            parent: _,
            template: '<span class="time">${Hnn}</span><span class="time">${Mnn}</span><span class="time">${Snn}</span><span class="f-ib ms"></span>'
        })
    };
    cG.AM = function() {
        yut.gA.dz({
            parent: e.cK("adv-cont").parentNode,
            slideList: e.cT("adv-cont", "ztag"),
            tabList: e.ft("adv-tab"),
            index: 0,
            selected: "sel",
            linkedItem: e.cK("adv-url"),
            urlList: Jm
        })
    };
    cG.pc = function() {
        if (!e.cK("hotProductsList")) {
            return
        }
        var lD = e.cK("hotProductsList").getElementsByTagName("li"),
        i,
        j;
        for (i = 0; i < lD.length; i++) {
            v.cM(lD[i], "mouseover",
            function(lE, i) {
                for (j = 0; j < lE.length; j++) {
                    e.nf(lE[j], "pd-hover")
                }
                e.dw(lE[i], "pd-hover")
            }.cC(this, lD, i))
        }
    };
    cG.oZ = function() {
        var defaultTXT = "请输入邮箱地址";
        var jL = $("#weekly-sub .eml");
        var oR = $("#weekly-sub .sub");
        jL.val(defaultTXT);
        jL.one("focus",
        function() {
            $(this).css({
                color: "#333"
            }).val("")
        });
        oR.click(function() {
            if (jL.val().match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/)) {
                $.post("/ajax.do?action=subscribeWeekly&act=yxpsydy_20120428_01", {
                    email: jL.val()
                },
                function(cA) {
                    if (cA.result && cA.result == 1) {
                        alert("感谢您订阅印像微可粒")
                    } else if (cA.result && cA.result == 2) {
                        alert("您已经订阅过印像微可粒")
                    } else {
                        alert("订阅服务出错")
                    }
                })
            } else {
                alert("请输入正确的邮箱地址")
            }
            return false
        })
    };
    cG.o$ = function() {
        yut.uf.dz({
            parent: "wrap-sale-record",
            height: 328
        })
    };
    cG.nZ = function() {
        var _ = e.cK("cd");
        var oX = 13547232e5;
        var oV = (new Date).getTime();
        yut.fM.dz({
            until: oX - oV,
            parent: _,
            template: '<span class="time time-1">${hnn}</span><span class="time time-2">${Mnn}</span><span class="time time-3">${Snn}</span><span class="time time-4">&nbsp;</span>'
        })
    };
    cG.BV = function() {
        swfobject.embedSWF("http://st1.yxp.126.net/rsc/img/fiveimg/pla.swf", "yxp-logo", "760", "81", "9.0.0", "/rsc/flash/expressInstall.swf", {},
        {
            allowScriptAccess: "always",
            wmode: "transparent",
            bgcolor: "#ffffff"
        })
    };
    new p.Jn
})()